package com.bear.forum.jdbc.imp;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import com.bear.PlatFormDao.forum.LoginLogDao;
import com.bear.model.entity.forum.LoginLog;

@Repository
public class LoginLogDaoImp implements LoginLogDao{
	@Autowired
	private JdbcTemplate jdbcTemplate;
	@Override
	public void insertLoginLog(LoginLog loginLog) {
		String sqlStr = "insert into loginlog(userid,ip,logindatime)" +
				" values(?,?,?)";
		Object[] args= {loginLog.getUserId(),loginLog.getIp(),loginLog.getLoginDate()};
		jdbcTemplate.update(sqlStr,args);
		
	}
	

}
